/*
 * @Author: 郑刘利
 * @Date: 2020-03-18 00:57:06
 * @LastEditors: 郑刘利
 * @LastEditTime: 2020-03-18 13:58:43
 * @Description: file content
 * @FilePath: \one_project\src\core\services\RequestApi.ts
 */

import http from '../../../utils/http';
import { IUser } from '../../domain/user/User';
export const fetchMySimpleInfo = async (): Promise<IUser> => {
    const result = (await http.get<IUser>('/my/info')).data;
    return result;
};

export const fetchMyMusics = async (): Promise<Array<any>> => {
    const result = (await http.get('/my/music')).data;
    return result;
};

export const fetchViewHistory = async (limit: number, count: number): Promise<any> => {
    const result = (await http.get('/my/views')).data;
    return result;
};

export const fetchSignalList = async (limit: number, count: number, type: number): Promise<any> => {
    const result = (await http.get('/my/views')).data;
    return result;
};
